package section12;

public class App12_1<T> {
    private T obj;

    public T getObj() {
        return obj;
    }

    public void setObj(T obj) {
        this.obj = obj;
    }

    public static void main(String[] args) {
        App12_1<String> name=new App12_1<String>();
        App12_1<Integer> age=new App12_1<Integer>();
        App12_1<Double> area= new App12_1<Double>();
        name.setObj("小明");
        String newName= name.getObj();

        age.setObj(24);
        int newAge= age.getObj();

        area.setObj(3.1415926);

        System.out.println("姓名："+newName);
        System.out.println("年龄:"+newAge);
        System.out.println("面积："+area.getObj());
    }
}
